package com.twb.auth.common;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.twb.auth.entity.twbOrganization.TwbOrganization;
import com.twb.auth.entity.twbProject.TwbProject;
import com.twb.auth.entity.twbResource.TwbResource;
import com.twb.auth.entity.twbRole.TwbRole;
import com.twb.auth.entity.twbTenantInfo.TwbTenantInfo;
import com.twb.auth.entity.twbUser.dto.TwbUserPostDto;
import com.twb.core.base.entity.BaseLoginUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @ClassName TwbLoginUser
 * @Description 登录用户信息，含权限信息
 * @author DSY
 * @date 2018年11月6日 下午4:50:34
 */
@ApiModel(value = "TwbLoginUser", description = "登录用户对象，含权限信息")
public class TwbLoginUser extends BaseLoginUser implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty("租户信息")
	private TwbTenantInfo tenantInfo;
	/* ================ 资源集合 Start ================ */
	/** 机构信息 */
	@ApiModelProperty("机构列表")
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Set<TwbOrganization> organizations = new HashSet<TwbOrganization>(0);
	/** 角色信息 */
	@ApiModelProperty("角色列表")
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Set<TwbRole> roles = new HashSet<TwbRole>(0);
	
	/** 登录用户所有资源 */
	private List<TwbResource> resources;

	/** 登录用户当前操作系统 */
	private TwbProject app;

	/** 登录用户可以操作的系统集合 */
	private List<TwbProject> appList;
	
	/** 用户岗位信息 */
	private List<TwbUserPostDto> posts;
	
	public Set<TwbOrganization> getOrganizations() {
		return organizations;
	}

	public void setOrganizations(Set<TwbOrganization> organizations) {
		this.organizations = organizations;
	}

	public Set<TwbRole> getRoles() {
		return roles;
	}

	public void setRoles(Set<TwbRole> roles) {
		this.roles = roles;
	}

	public TwbTenantInfo getTenantInfo() {
		return tenantInfo;
	}

	public void setTenantInfo(TwbTenantInfo tenantInfo) {
		this.tenantInfo = tenantInfo;
	}

	public List<TwbResource> getResources() {
		return resources;
	}

	public void setResources(List<TwbResource> resources) {
		this.resources = resources;
	}

	public TwbProject getApp() {
		return app;
	}

	public void setApp(TwbProject app) {
		this.app = app;
	}

	public List<TwbProject> getAppList() {
		return appList;
	}

	public void setAppList(List<TwbProject> appList) {
		this.appList = appList;
	}

	public List<TwbUserPostDto> getPosts() {
		return posts;
	}

	public void setPosts(List<TwbUserPostDto> posts) {
		this.posts = posts;
	}
	/* ================ 资源集合 End ================ */

}
